package com.stone.gateway.config;

import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;
import org.springframework.boot.web.server.Ssl;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 网关配置文件
 * @author fxj
 * @date 2020/5/9
 */
@Data
@Component
@NoArgsConstructor
@ConfigurationProperties(prefix="thing.gateway")
public class GwProperties {

    /**
     * 管理端口
     */
    private Integer port = 443;

    /**
     * SSl配置
     * PKCS12
     */
    @NestedConfigurationProperty
    private Ssl ssl;

    /**
     * 拦截路径
     */
    List<String> patterns;

    /**
     * 白名单路径
     */
    List<String> whiteList;
}
